<?php
include_once("../configure/admin.config.inc.php");//--> admin global var
include_once("db.inc.php");						//--> db global var

include_once("impl/MenuImpl.php");

require_once("controlHeader.php");				//--> system control header

$oMenuImpl		= new MenuImpl(DB_TAG_SYSTEM);	//--> Menu



if(isset($_GET['id']) && !empty($_GET['id'])){
	$id = $_GET['id'];

	$isReturn = $oMenuImpl->delete($id);
	if($isReturn)
		$error_message = 'delete successfully.';
	else 
		$error_message = 'delete fail.';
}

echo "<script language='javascript'>";
echo "alert(\"$error_message\");";
echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";";
echo "</script>";

//$backurl = $_SERVER['HTTP_REFERER'];
//header("Location: $backurl");
?>
